Completed
Push — master ( 78b7d3...971ae6 )
by Thomas
49s queued 29s
created

module.exports   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 17

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 2
c 1
b 0
f 0
nc 2
dl 0
loc 17
rs 9.4285
nop 1

1 Function

Rating   Name   Duplication   Size   Complexity  
A 0 5 2
1
/*
2
 * Copyright (c) 2018 Includable.
3
 * Created by Thomas Schoffelen.
4
 */
5
6
const uninstall = require('spawn-npm-install').uninstall
7
const Plugins = require('../../util/Plugins')
8
const output = require('../../output')
9
10
module.exports = function (name) {
11
  if (name.indexOf('cli-') < 0) {
12
    name = '@includable/cli-' + name
13
  }
14
15
  uninstall(name, {
16
    cwd: Plugins.directory,
17
    noShrinkwrap: true,
18
    production: true,
19
    noBinLinks: true,
20
    save: true
21
  }, function (err) {
22
    if (err) {
23
      output.errSimple(err.message)
24
    }
25
  })
26
}
27